home *** CD-ROM | disk | FTP | other *** search
- /*
- $Ver 1.0
- Random Load & Play of PlaySID 3.0 tunes
- Uses the ASCII file created by PSIDExtract
- (C) 1994.7.1 Jan Diabelez Harries
- */
-
- options results
-
- IF ~SHOW(Ports,'PLAYSID') THEN DO
- ADDRESS COMMAND 'CD SID:'"0a"X'RUN SID:PlaySID'
- ADDRESS COMMAND 'WaitForPort PLAYSID'
- END
-
- address 'PLAYSID'
-
- /* List of PlaySID music; you should enter your own list here */
- filename='DATA:SuperData/PlaySidMusic.asc'
-
- x=OPEN(f,filename,'R')
- IF x=0 THEN RETURN(10);
- filelenght=SEEK(f,0,'E')
-
- location =TRUNC(filelenght * randu(time('S')))
-
- CALL SEEK(f,location,'B')
- line=READLN(f)
- IF EOF(f) THEN EXIT(10);
- line=READLN(f)
- CALL CLOSE(f)
-
- PARSE VAR line songs '","' a1 '","' a2 '","' a3 '","' SIDName
- songs = COMPRESS(songs,'"')
- PARSE VAR songs s1 ',' s2
-
- IF s2 == "" THEN
- s2 = 1
-
- SIDName = COMPRESS(SIDName,'"')
- SID_LOAD(SIDName)
-
- /* If you have PlaySID 3.0, you do not need this line! */
- SID_PLAY()
-
- exit
-